from selenium.webdriver.common.by import By
from autoTest_ecshop.base_page.base import BasePage
from autoTest_ecshop.utils.log_util import logger
#继承基础类  BasePage
class Lgoinpage(BasePage):
    #登录
    username_loc = ( By.NAME, "username")
    password_loc = (By.NAME, "password")
    submit_loc = (By.CSS_SELECTOR, 'input[value="进入管理中心"]')

    #夺宝奇兵
    def login(self,user,password):
        logger.info(f"输入用户名{user}")
        self.input_data(self.username_loc,user)
        logger.info(f"输入密码{password}")
        self.input_data(self.password_loc,password)
        logger.info(f"点击登录")
        self.click_d(self.submit_loc)


